class LossFucOrganizationError(Exception):
    def __init__(self,
                 message="The loss function organization is abnormal, "
                         "the `auto` type should not be included in multiple loss functions",
                 code=None):
        super().__init__(message)
        self.code = code

    def __str__(self):
        if self.code:
            return f"{self.code}: {self.args[0]}"
        return self.args[0]


if __name__ == '__main__':
    raise LossFucOrganizationError()
